import java.util.Scanner;

public class lesson74 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入机票原价");
        int ticket = sc.nextInt();
        System.out.println("请输入月份");
        int month = sc.nextInt();
        System.out.println("请输入舱型 0代表经济舱 1代表头等舱");
        int seat = sc.nextInt();
        if(month >= 5 && month <= 10){
            ticket = getPrice(1990,seat,0.9,0.85);
        }else if((month >= 11) || (month <=4)){
            ticket = getPrice(1990,seat,0.7,0.65);
        }else{
            System.out.println("录入月份不合法");
        }
        System.out.println(ticket);
    }
    public static int getPrice(int ticket,int seat,double v0,double v1){
        if(seat == 1){
            ticket = (int)(ticket * v1);
        }else if(seat == 0){
            ticket = (int)(ticket * v0);
        }else{
            System.out.println("没有这个舱位");
        }
        return ticket;
    }
}
